<template>
    <div class="login" id="login" >
      <div class="login_body">
        <div class="login_body_btn_login">
            <button  @click="debounceHandleLogin"
             class="btn-big btn-big-ty1 btn-disabled">go  home</button>
          </div>
        </div>
      </div>
</template>
<script>
import {
  mapActions,
  mapGetters,
} from 'vuex';
import { debounce, browser } from '../../utils/helps';

export default {
  data() {
    return {
      debounceHandleUpdateMobilePhone: () => { },
      debounceHandleLogin: () => {},
    };
  },
  computed: {
    ...mapGetters(['provincesList', 'urlData', 'shareObj']),
  },
  methods: {
    ...mapActions([]),
    async handleLogin() {
      this.$router.push({ name: 'home' });
    },
  },
  async created() {
    this.debounceHandleLogin = debounce(this.handleLogin, 200);
  },
  mounted() {
    const originHeight = document.documentElement.clientHeight || document.body.clientHeight;
    if (browser.versions().android) {
      window.addEventListener('resize', () => {
        const resizeHeight = document.documentElement.clientHeight || document.body.clientHeight;
        if (originHeight - resizeHeight > 200) {
          document.getElementById('login').scrollTop = 100;
          // 键盘弹起所后所需的页面逻辑
        } else {
          document.getElementById('login').scrollTop = 0;
          // 键盘弹起所后所需的页面逻辑
        }
      }, false);
    }
  },
};
</script>
<style lang="less">
</style>
